<%@page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="/WEB-INF/tld/frsf.tld" prefix="frsf"%>
<!-- goods/jsp/st/GoodsStOrgStock/edit.jsp -->
<%@include file="/htmlframe/jsp/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<link rel="stylesheet" type="text/css" href="<%=hf_cssPath%>core.css" />
<form action="" id="EditForm" method="post">
	<input type="hidden" id="id" name="goodsStOrgStock.id" value="${goodsStOrgStock.id}"/>
  <table width="100%" cellspacing="0" class="table">
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_HOSPITAL_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.hospitalNo" id="hospitalNo" value="${goodsStOrgStock.hospitalNo}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_STOCK_ORG_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.stockOrgNo" id="stockOrgNo" value="${goodsStOrgStock.stockOrgNo}"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_GOODS_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.goodsNo" id="goodsNo" value="${goodsStOrgStock.goodsNo}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_BARCODE %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.barcode" id="barcode" value="${goodsStOrgStock.barcode}"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_BATCH_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.batchNo" id="batchNo" value="${goodsStOrgStock.batchNo}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_VALIDATE %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.validate" id="validate" value="${goodsStOrgStock.validate}"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_STOCK_QTY %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.stockQty" id="stockQty" value="${goodsStOrgStock.stockQty}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_STOCK_UNIT %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.stockUnit" id="stockUnit" value="${goodsStOrgStock.stockUnit}"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_STOCK_PRICE %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.stockPrice" id="stockPrice" value="${goodsStOrgStock.stockPrice}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_UPDATE_USER_ID %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.updateUserId" id="updateUserId" value="${goodsStOrgStock.updateUserId}"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_UPDATE_USER_NAME %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.updateUserName" id="updateUserName" value="${goodsStOrgStock.updateUserName}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.st.entity.GoodsStOrgStock.ALIAS_UPDATE_TIME %>：</label></th>
	  <td width="35%"><input type="text" name="goodsStOrgStock.updateTime" id="updateTime" value="${goodsStOrgStock.updateTime}"/></td>
	</tr>
	<tr>
	  <td colspan="4" align="center" style="padding-top: 20px;padding-bottom: 10px;">
		<a href="javascript:void(0)" onclick="submitForm()" class="easyui-linkbutton" data-options="iconCls:'icon-save'" style="width:80px">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="javascript:void(0)" onclick="closeMenu()" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:80px">返回</a>
	  </td>
	</tr>
  </table>
</form>
<script type="text/javascript">
function submitForm(url){
	var submitTime = 0;
	var str = "{" +
"\"id\":\"" + $('#id').val() + "\"" + "," +"\"hospitalNo\":\"" + $('#hospitalNo').val() + "\"" + "," +"\"stockOrgNo\":\"" + $('#stockOrgNo').val() + "\"" + "," +"\"goodsNo\":\"" + $('#goodsNo').val() + "\"" + "," +"\"barcode\":\"" + $('#barcode').val() + "\"" + "," +"\"batchNo\":\"" + $('#batchNo').val() + "\"" + "," +"\"validate\":\"" + $('#validate').val() + "\"" + "," +"\"stockQty\":\"" + $('#stockQty').val() + "\"" + "," +"\"stockUnit\":\"" + $('#stockUnit').val() + "\"" + "," +"\"stockPrice\":\"" + $('#stockPrice').val() + "\"" + "," +"\"updateUserId\":\"" + $('#updateUserId').val() + "\"" + "," +"\"updateUserName\":\"" + $('#updateUserName').val() + "\"" + "," +"\"updateTime\":\"" + $('#updateTime').val() + "\"" + 
			  "}";
	submitTime++;
	$.ajax({ 
		type : "POST", 
		dataType : "json", 
		url:j_basePath + 'goods/goodsStOrgStock_update.do', 
		traditional: true,//在struts2下该属性必须有
		async:false,
		data:{data: str}, 
		success:function(result){
			if(result){
				alert(result.message);
				if(result.opttype == "true"){
					try{
						top.refreshDataGrid();
						}catch(e){}
					top.closeDialog();
				}else{
					submitTime = 0;
				}
			}
		},
		error:function(){
			submitTime = 0;
		}
	});
}
function closeMenu(){
	top.closeDialog();
}
</script>
</body>
</html>